﻿using GameProtocol.Protocol;
using NetCommon;
using ServerFrame;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RPGGameServer.Logic
{
    /// <summary>
    /// 逻辑处理模块的接口
    /// </summary>
    interface IHandler
    {
        /// <summary>
        /// 该模块对应的协议类型 （战斗模块、 登录模块等）
        /// </summary>
        Protocal Protocal { get;}

        /// <summary>
        /// 该模块接收消息的接口
        /// </summary>
        /// <param name="token"></param>
        /// <param name="model"></param>
        void ReceiveMessage(UserToken token, NetModel model);

        /// <summary>
        /// 该模块处理客户端断开的接口
        /// </summary>
        /// <param name="token"></param>
        /// <param name="error"></param>
        void ClientClose(UserToken token, string error);
    }
}
